The present invention relates to image processing apparatuses such as a copier, facsimile machine and printer. More specifically, the invention relates to an image processing apparatus which recognizes surface (or background) portions (i.e., portions other than character portions, figure portions, etc.) of a document and fixes their density to a preset surface density.
In general, in reading an image of a document and recording it or displaying it on a display unit, it is preferable that surface portions be expressed consistently as white portions rather than expressed using their actual densities. For the same reason, for instance in the photography art, copies are produced by applying a yellow filter to an old photograph having yellow, discolored patches to thereby converting its surface color to white.
Similarly, in image processing apparatuses such as a copier, if, for instance, a diazo document is recorded while its surface portions are read in a consistent manner, unevenness in density or stained background portions become conspicuous, making necessary information-bearing portions such as character portions less legible. Conventionally, to solve this problem, there has been proposed an image processing apparatus having a surface color elimination device which detects the density level of surface portions and eliminates density data and consistently uses white data for the surface portions.
FIG. 48 shows the conceptual constitution of the above type of image processing apparatus as described in Japanese Patent Application Unexamined Publication No. Hei. 3-68270. In this apparatus, an image reading means 102 reads a document 101 to produce image data 103. The image data 103 is input to a surface density detection means 104, which detects a document surface density by averaging, for each scanning line, the density data 103 of pixels having a density within a predetermined density range. In this operation, sampling is performed every four pixels. The averaging is performed on sampled pixels of a predetermined number (e.g., four). Therefore, the averaging cannot be performed at the beginning portion of each scanning line, where four pixels have not been obtained. At the beginning portion of each scanning line, a preset initial elimination level is used instead of performing the averaging.
Then, a surface reference density generation means 106 generates a surface reference density by adding an offset, which is set by an offset setting means 105, to the above averaged density data. The generated surface reference density is input to a surface color elimination means 107. The surface color elimination means 107 eliminates surface portions whose density is smaller than the surface reference density from the density data 103 that is output from the image reading means 102, and supplies the remaining portions of the density data 103 to an image forming means 108 to enable it to print out an image.
In the above image processing apparatus, since the surface reference density is generated in accordance with the detected surface density, the surface portions can be eliminated by discriminating them from the other portions when the surface density increases or decreases gently, in which case the surface reference density varies accordingly. However, in the case of diazo documents, newspapers, etc. having a high surface density, the surface density exceeds the predetermined density range of the surface density detection means 104, so that the surface portions are output as they are, that is, with the surface color not corrected to white.
To avoid such a problem, it may be conceivable to set the a wider density range for calculation of the surface density. In this case, however, the surface reference density becomes much higher, because pixels having a higher density are also subjected to the averaging operation and the offset setting means 105 adds the offset to the thus averaged surface density. For example, in a case of reading a straight line written on a square sheet of fancy paper with a pencil and extending in the main scanning direction, a problem occurs because the straight line is not output from a certain position. This problems occurs because at the beginning portion the surface reference density is still relatively low and the pencil-written line is read as an image portion, in the meantime the pencil-written line is subjected to the averaging operation, and finally a further increase of the surface reference density causes the pencil-written line to be recognized as a surface portion.
As shown in FIG. 15, in a certain kind of image processing apparatus, the processing speed is increased by performing processing for each of several blocks produced by dividing an image in the main scanning direction. That is, the processing on a scanning line is performed on a block-by-block basis. Where one scanning line is divided into six sections belonging to respective blocks as in the case of FIG. 15, the initial elimination levels are set at six points on the original scanning line. Therefore, if the initial elimination level is too high or too low, the surface detection is not performed in the normal way to cause problems; for instance, an image portion disappears or, conversely, a surface portion is output.
Furthermore, in conventional apparatuses, the image sampling is performed with a fixed density range and at a fixed sampling period. Therefore, a low-contrast image written on a high-density surface (such as in the above example) will disappear if the response speed is fast enough to sample every pixel, in which case the surface density detection follows the density variation. On the other hand, if the response speed is lowered so as not to respond to a quick-varying surface density, the corresponding surface portion will be output.
Referring to FIG. 49, the problem associated with the fast response speed is described in a specific manner. FIG. 49 shows a variation of density data 111 whose level exists between an absolute white level and an absolute black level. The absolute white level means a lowest level (a highest degree of white) of densities that can be regarded as a surface density, and the absolute black level means a highest level (a highest degree of black) of the densities that can be regarded as a surface density. In FIG. 49, an offset is represented by .alpha.. Where the surface reference density has a fast response speed, a surface reference density 112 indicated by a dashed line is higher than density data 111 at any point, i.e., even at slightly high density portion 111A of the density data 111. As a result, even if the high density portion 111A is an image portion, it is judged to be a surface portion. That is, all the density data 111 is fixed to the white level and the image portion disappears.
Referring to an example of FIG. 50, the problem associated with the slow response speed is described in a specific manner. A surface reference density 113 indicated by a chained line exhibits almost no variation even at a slightly high density portion 111A of density data 111. As a result, only the portions below the surface reference density 113 are eliminated as surface portions. Even if the high density portion 111A is part of a surface portion, it is erroneously output as an image portion.